package com.zhouhailin.reflection;

/**
 * @Author：zhouhailin
 * @Date： 2023/2/13
 */
public class User {
    private int age = 10;
    private String name = "zhouhailin";

    /**
     * 无参
     */
    public User() {
    }

    /**
     * public 的有参构造器
     *
     * @param name
     */
    public User(String name) {
        this.name = name;
    }

    /**
     * private 有参构造器
     *
     * @param age
     * @param name
     */
    private User(int age, String name) {
        this.age = age;
        this.name = name;
    }

    @Override
    public String toString() {
        return "User [age=" + age + ", name=" + name + "]";
    }
}
